import QtQuick 1.0

Rectangle {
  id: loading
  color: "#ffffff"

  property alias text: label.text
  property int fontSize

  Rectangle {
    color: "#000000"
    x: (parent.width - (image.width + label.width)) / 2
    anchors.verticalCenter: parent.verticalCenter;

    Image {
      id: image
      source: "qrc:loading.png"
      NumberAnimation on rotation {
        from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900
      }
    }

    Text {
      id: label
      x: image.x + image.width + 10
      color: "#000000"
      font.pixelSize: fontSize
    }
  }
}
